package com.zs.toolbox.web2j.system.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zs.toolbox.web2j.common.domain.WtBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 角色-权限关联表
 * </p>
 *
 * @author eric.zhang
 * @since 2018-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_role_permission")
@ApiModel(value = "WtRolePermissionEntity对象", description = "角色-权限关联表")
public class WtRolePermissionEntity extends WtBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "角色id")
    @TableField("role_id")
    private Long roleId;

    @ApiModelProperty(value = "权限id")
    @TableField("permission_id")
    private Long permissionId;

    @ApiModelProperty(value = "创建日期")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新日期")
    @TableField(value = "update_time", update = "now()", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否有效 1有效    2无效")
    @TableField("delete_status")
//    @TableLogic
    private Integer deleteStatus;

@TableField(value = "create_user", fill = FieldFill.INSERT)
    private Integer createUser;


}
